﻿using System.Linq;
using Sumen.Model.Model;

namespace Sumen.Business.Presenter.Sys
{
    public class SysParameterPresenter
    {
        private sumenEntitiesSystem _sumenEntities;// = new sumenEntitiesSystem();

        public SysParameterPresenter(sumenEntitiesSystem pContext)
        {
            _sumenEntities = pContext;
        }

        public string GetScalar(string pOptionID)
        {

            var query = _sumenEntities.sys_option.FirstOrDefault(p => p.Opt_ID == pOptionID);
            if (query != null)
                return query.Opt_Value;
            else
                return "";


        }


    }
}
